package cn.lanqiao.dao;

import cn.lanqiao.vo.UserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserRoleDao {

    @Insert("insert into user_role (user_id, role_id) values (#{userId}, #{roleId})")
    void insert(UserVO userVO);

    @Update("update user_role set role_id = #{roleId} where user_id = #{userId}")
    void update(UserVO userVO);

    @Delete("delete from user_role where user_id = #{id}")
    void delete(String id);
}
